package com.qf.ssm.service.Impl;

import com.qf.ssm.entity.FrontCategoryTwo;
import com.qf.ssm.mapper.FrontCategoryTwoMapper;
import com.qf.ssm.service.FrontCategoryTwoService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class FrontCategoryTwoServiceImpl implements FrontCategoryTwoService {

    @Resource
    private FrontCategoryTwoMapper frontCategoryTwoMapper;

    @Override
    public int deleteByPrimaryKey(Integer fctId) {
        return frontCategoryTwoMapper.deleteByPrimaryKey(fctId);
    }

    @Override
    public int insert(FrontCategoryTwo record) {
        return frontCategoryTwoMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(FrontCategoryTwo record) {
        return frontCategoryTwoMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(FrontCategoryTwo record) {
        return frontCategoryTwoMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(FrontCategoryTwo record) {
        return frontCategoryTwoMapper.insertSelective(record);
    }

    @Override
    public FrontCategoryTwo selectByPrimaryKey(Integer fctId) {
        return frontCategoryTwoMapper.selectByPrimaryKey(fctId);
    }

    @Override
    public int updateByPrimaryKeySelective(FrontCategoryTwo record) {
        return frontCategoryTwoMapper.updateByPrimaryKeySelective(record);
    }

    /**
     * 通过主键编辑二级类目
     * @param record
     * @return
     */
    @Override
    public int updateByPrimaryKey(FrontCategoryTwo record) {
        return frontCategoryTwoMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateBatch(List<FrontCategoryTwo> list) {
        return frontCategoryTwoMapper.updateBatch(list);
    }

    @Override
    public int batchInsert(List<FrontCategoryTwo> list) {
        return frontCategoryTwoMapper.batchInsert(list);
    }

    @Override
    public List<FrontCategoryTwo> selectNameAndDate(String fctName, Date frontDate, Date afterDate) {
        return frontCategoryTwoMapper.selectNameAndDate(fctName,frontDate,afterDate);
    }
}
